<template>
    <mt-loadmore  :bottom-method="loadBottom" :top-method="loadTop" :bottom-all-loaded = "status" ref="loadmore" :bottomPullText="text">
        <slot></slot>
    </mt-loadmore>
</template>
<style>
    .mint-loadmore{
        width: 100%;
        font-size: 12px;
        min-height: 100%;
        padding-bottom: 2rem;
    }
</style>
<script>
    export default {
        data() {
            return {
                topStatus: '',
                status:false,
                text:'上拉加载'
            };
        },
        methods: {
            loadBottom() {
                this.$emit("load")
            },
            loadTop() {
                this.status = true
                this.$emit("refresh")
            },
            removeLoading(){
                this.$refs.loadmore.onBottomLoaded()
                this.$refs.loadmore.onTopLoaded()
            },
            isNoData(){
                this.status = true
                this.text = "没有更多"
            },
            reset(){
                this.status = true
                this.text="上拉加载"
            }
        }

    };
</script>